package com.taojin.shoppinginterest.utils;

import android.content.Context;

import com.lidroid.xutils.BitmapUtils;


public class BitmapHelper {
    private static BitmapHelper helper;
    private BitmapUtils bitmapUtils;

    public static BitmapHelper getInstance() {
        if (helper == null) {
            helper = new BitmapHelper();
        }
        return helper;
    }

    public BitmapUtils getBitmapUtils(Context context, int loadingDrawable, int failDrawable) {
        if (bitmapUtils == null) {
            bitmapUtils = new BitmapUtils(context);
            bitmapUtils.configDefaultLoadFailedImage(failDrawable);
            bitmapUtils.configDefaultLoadingImage(loadingDrawable);
        }
        return bitmapUtils;
    }


}
